/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Leoz
 */
@Embeddable
public class MoviePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idMovie")
    private int idMovie;
    @Basic(optional = false)
    @Column(name = "Soundtrack_idSoundtrack")
    private int soundtrackidSoundtrack;

    public MoviePK() {
    }

    public MoviePK(int idMovie, int soundtrackidSoundtrack) {
        this.idMovie = idMovie;
        this.soundtrackidSoundtrack = soundtrackidSoundtrack;
    }

    public int getIdMovie() {
        return idMovie;
    }

    public void setIdMovie(int idMovie) {
        this.idMovie = idMovie;
    }

    public int getSoundtrackidSoundtrack() {
        return soundtrackidSoundtrack;
    }

    public void setSoundtrackidSoundtrack(int soundtrackidSoundtrack) {
        this.soundtrackidSoundtrack = soundtrackidSoundtrack;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idMovie;
        hash += (int) soundtrackidSoundtrack;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MoviePK)) {
            return false;
        }
        MoviePK other = (MoviePK) object;
        if (this.idMovie != other.idMovie) {
            return false;
        }
        if (this.soundtrackidSoundtrack != other.soundtrackidSoundtrack) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.MoviePK[ idMovie=" + idMovie + ", soundtrackidSoundtrack=" + soundtrackidSoundtrack + " ]";
    }
    
}
